import java.time.LocalDate;

public class Demo05 {
    public static void main(String[] args) {
        System.out.println(getFatherDay(2021));//6-20
        System.out.println(getFatherDay(2020));//6-21
    }

    public static LocalDate getFatherDay(int year) {
        LocalDate d = LocalDate.of(year, 6, 1);
        int count=0;
        do {
            if(d.getDayOfWeek().getValue()==7) {
                count++;
            }
            d = d.plusDays(1);
        }while(count<3);
        return d;
    }
}
